- name: make the app be real
  hosts: os_control[0]:os_control_stg[0]
  user: root
  gather_facts: False
  vars:
    ssh_key_path: "{{ private }}/files/websites/id_rsa_web_trans_{{ env_short }}"
  vars_files:
    - /srv/web/infra/ansible/vars/global.yml
    - "/srv/private/ansible/vars.yml"
    - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml

  roles:
  - role: openshift/project
    app: websites
    description: Fedora websites building
    appowners:
    - codeblock
    - ryanlerch
    - darknao

  - role: openshift/object
    app: websites
    file: pvc.yml
    objectname: pvc.yml

  - role: openshift/imagestream
    app: websites
    imagename: builder

  - role: openshift/object
    app: websites
    template: buildconfig.yml
    objectname: buildconfig.yml

  - role: openshift/start-build
    app: websites
    buildname: websites-build
    objectname: websites-build

  - role: openshift/object
    app: websites
    template: configmap.yml
    objectname: configmap.yml

  - role: openshift/object
    app: websites
    template: cm-updatepot.yml
    objectname: cm-updatepot.yml

  - role: openshift/object
    app: websites
    template: gitconfig.yml
    objectname: gitconfig.yml

  - role: openshift/object
    app: websites
    template: sshconfig.yml
    objectname: sshconfig.yml

  - role: openshift/object
    app: websites
    template: cron.yml
    objectname: cron.yml

  - role: openshift/object
    app: websites
    template: cron-updatepot.yml
    objectname: cron-updatepot.yml

  - role: openshift/imagestream
    app: websites
    imagename: fedora-websites

  - role: openshift/object
    app: websites
    template: fedora-websites-bc.yml
    objectname: fedora-websites-bc.yml

  - role: openshift/start-build
    app: websites
    buildname: fedora-websites
    objectname: fedora-websites

  - role: openshift/object
    app: websites
    template: fedora-websites-cron.yml
    objectname: fedora-websites-cron.yml
